package com.pvdnc.outguess;

import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.UUID;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import java.util.zip.ZipOutputStream;

public class ZipUtils {
    public static void compress(String fileName, byte[] data, ByteArrayOutputStream bos) throws IOException {
        ZipOutputStream zos = new ZipOutputStream(bos);
        ZipEntry entry = new ZipEntry(fileName);
        zos.putNextEntry(entry);
        zos.write(data);
        zos.closeEntry();
        zos.finish();
    }
}
